<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Mocks::Proxy</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Mocks::Proxy</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/rspec/lib/spec/mocks/proxy_rb.html">
                vendor/plugins/rspec/lib/spec/mocks/proxy.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000250">act_as_null_object</a>&nbsp;&nbsp;
      <a href="#M000251">add_message_expectation</a>&nbsp;&nbsp;
      <a href="#M000252">add_negative_message_expectation</a>&nbsp;&nbsp;
      <a href="#M000253">add_stub</a>&nbsp;&nbsp;
      <a href="#M000247">allow_message_expectations_on_nil</a>&nbsp;&nbsp;
      <a href="#M000256">has_negative_expectation?</a>&nbsp;&nbsp;
      <a href="#M000257">message_received</a>&nbsp;&nbsp;
      <a href="#M000248">new</a>&nbsp;&nbsp;
      <a href="#M000249">null_object?</a>&nbsp;&nbsp;
      <a href="#M000258">raise_unexpected_message_args_error</a>&nbsp;&nbsp;
      <a href="#M000259">raise_unexpected_message_error</a>&nbsp;&nbsp;
      <a href="#M000255">received_message?</a>&nbsp;&nbsp;
      <a href="#M000254">reset</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">DEFAULT_OPTIONS</td>
          <td>=</td>
          <td class="context-item-value">{         :null_object =&gt; false,       }</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000247" class="method-detail">
        <a name="M000247"></a>

        <div class="method-heading">
          <a href="#M000247" class="method-signature">
          <span class="method-name">allow_message_expectations_on_nil</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000247-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000247-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 10</span>
10:       <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allow_message_expectations_on_nil</span>
11:         <span class="ruby-ivar">@@warn_about_expectations_on_nil</span> = <span class="ruby-keyword kw">false</span>
12:         
13:         <span class="ruby-comment cmt"># ensure nil.rspec_verify is called even if an expectation is not set in the example</span>
14:         <span class="ruby-comment cmt"># otherwise the allowance would effect subsequent examples</span>
15:         <span class="ruby-identifier">$rspec_mocks</span>.<span class="ruby-identifier">add</span>(<span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$rspec_mocks</span>.<span class="ruby-identifier">nil?</span>
16:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000248" class="method-detail">
        <a name="M000248"></a>

        <div class="method-heading">
          <a href="#M000248" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(target, name, options={})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000248-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000248-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 18</span>
18:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">target</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>={})
19:         <span class="ruby-ivar">@target</span> = <span class="ruby-identifier">target</span>
20:         <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
21:         <span class="ruby-ivar">@error_generator</span> = <span class="ruby-constant">ErrorGenerator</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">target</span>, <span class="ruby-identifier">name</span>
22:         <span class="ruby-ivar">@expectation_ordering</span> = <span class="ruby-constant">OrderGroup</span>.<span class="ruby-identifier">new</span> <span class="ruby-ivar">@error_generator</span>
23:         <span class="ruby-ivar">@expectations</span> = []
24:         <span class="ruby-ivar">@messages_received</span> = []
25:         <span class="ruby-ivar">@stubs</span> = []
26:         <span class="ruby-ivar">@proxied_methods</span> = []
27:         <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span> <span class="ruby-value">? </span><span class="ruby-constant">DEFAULT_OPTIONS</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>) <span class="ruby-operator">:</span> <span class="ruby-constant">DEFAULT_OPTIONS</span>
28:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000250" class="method-detail">
        <a name="M000250"></a>

        <div class="method-heading">
          <a href="#M000250" class="method-signature">
          <span class="method-name">act_as_null_object</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000250-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000250-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 34</span>
34:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">act_as_null_object</span>
35:         <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:null_object</span>] = <span class="ruby-keyword kw">true</span>
36:         <span class="ruby-ivar">@target</span>
37:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000251" class="method-detail">
        <a name="M000251"></a>

        <div class="method-heading">
          <a href="#M000251" class="method-signature">
          <span class="method-name">add_message_expectation</span><span class="method-args">(expected_from, sym, opts={}, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000251-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000251-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 39</span>
39:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_message_expectation</span>(<span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-identifier">opts</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)        
40:         <span class="ruby-identifier">__add</span> <span class="ruby-identifier">sym</span>
41:         <span class="ruby-identifier">warn_if_nil_class</span> <span class="ruby-identifier">sym</span>
42:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">existing_stub</span> = <span class="ruby-ivar">@stubs</span>.<span class="ruby-identifier">detect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">sym</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">sym</span> }
43:           <span class="ruby-identifier">expectation</span> = <span class="ruby-identifier">existing_stub</span>.<span class="ruby-identifier">build_child</span>(<span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">block_given?</span><span class="ruby-value">? </span><span class="ruby-identifier">block</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>, <span class="ruby-identifier">opts</span>)
44:         <span class="ruby-keyword kw">else</span>
45:           <span class="ruby-identifier">expectation</span> = <span class="ruby-constant">MessageExpectation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@error_generator</span>, <span class="ruby-ivar">@expectation_ordering</span>, <span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-identifier">block_given?</span> <span class="ruby-value">? </span><span class="ruby-identifier">block</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>, <span class="ruby-value">1</span>, <span class="ruby-identifier">opts</span>)
46:         <span class="ruby-keyword kw">end</span>
47:         <span class="ruby-ivar">@expectations</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">expectation</span>
48:         <span class="ruby-ivar">@expectations</span>.<span class="ruby-identifier">last</span>
49:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000252" class="method-detail">
        <a name="M000252"></a>

        <div class="method-heading">
          <a href="#M000252" class="method-signature">
          <span class="method-name">add_negative_message_expectation</span><span class="method-args">(expected_from, sym, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000252-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000252-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 51</span>
51:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_negative_message_expectation</span>(<span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
52:         <span class="ruby-identifier">__add</span> <span class="ruby-identifier">sym</span>
53:         <span class="ruby-identifier">warn_if_nil_class</span> <span class="ruby-identifier">sym</span>
54:         <span class="ruby-ivar">@expectations</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">NegativeMessageExpectation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@error_generator</span>, <span class="ruby-ivar">@expectation_ordering</span>, <span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-identifier">block_given?</span> <span class="ruby-value">? </span><span class="ruby-identifier">block</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>)
55:         <span class="ruby-ivar">@expectations</span>.<span class="ruby-identifier">last</span>
56:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000253" class="method-detail">
        <a name="M000253"></a>

        <div class="method-heading">
          <a href="#M000253" class="method-signature">
          <span class="method-name">add_stub</span><span class="method-args">(expected_from, sym, opts={})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000253-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 58</span>
58:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_stub</span>(<span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-identifier">opts</span>={})
59:         <span class="ruby-identifier">__add</span> <span class="ruby-identifier">sym</span>
60:         <span class="ruby-ivar">@stubs</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-constant">MessageExpectation</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@error_generator</span>, <span class="ruby-ivar">@expectation_ordering</span>, <span class="ruby-identifier">expected_from</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">:any</span>, <span class="ruby-identifier">opts</span>)
61:         <span class="ruby-ivar">@stubs</span>.<span class="ruby-identifier">first</span>
62:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000256" class="method-detail">
        <a name="M000256"></a>

        <div class="method-heading">
          <a href="#M000256" class="method-signature">
          <span class="method-name">has_negative_expectation?</span><span class="method-args">(sym)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000256-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000256-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 82</span>
82:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_negative_expectation?</span>(<span class="ruby-identifier">sym</span>)
83:         <span class="ruby-ivar">@expectations</span>.<span class="ruby-identifier">detect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">expectation</span><span class="ruby-operator">|</span> <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">negative_expectation_for?</span>(<span class="ruby-identifier">sym</span>)}
84:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000257" class="method-detail">
        <a name="M000257"></a>

        <div class="method-heading">
          <a href="#M000257" class="method-signature">
          <span class="method-name">message_received</span><span class="method-args">(sym, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000257-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000257-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 86</span>
 86:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message_received</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
 87:         <span class="ruby-identifier">expectation</span> = <span class="ruby-identifier">find_matching_expectation</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
 88:         <span class="ruby-identifier">stub</span> = <span class="ruby-identifier">find_matching_method_stub</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
 89: 
 90:         <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">stub</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">expectation</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">called_max_times?</span>) <span class="ruby-operator">||</span>
 91:             (<span class="ruby-identifier">stub</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">expectation</span>)
 92:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">expectation</span> = <span class="ruby-identifier">find_almost_matching_expectation</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
 93:             <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">advise</span>(<span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">expected_messages_received?</span>
 94:           <span class="ruby-keyword kw">end</span>
 95:           <span class="ruby-identifier">stub</span>.<span class="ruby-identifier">invoke</span>([], <span class="ruby-identifier">block</span>)
 96:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">expectation</span>
 97:           <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">invoke</span>(<span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>)
 98:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">expectation</span> = <span class="ruby-identifier">find_almost_matching_expectation</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
 99:           <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">advise</span>(<span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">null_object?</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">expectation</span>.<span class="ruby-identifier">expected_messages_received?</span>
100:           <span class="ruby-identifier">raise_unexpected_message_args_error</span>(<span class="ruby-identifier">expectation</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-keyword kw">unless</span> (<span class="ruby-identifier">has_negative_expectation?</span>(<span class="ruby-identifier">sym</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">null_object?</span>)
101:         <span class="ruby-keyword kw">else</span>
102:           <span class="ruby-ivar">@target</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:method_missing</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
103:         <span class="ruby-keyword kw">end</span>
104:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000249" class="method-detail">
        <a name="M000249"></a>

        <div class="method-heading">
          <a href="#M000249" class="method-signature">
          <span class="method-name">null_object?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000249-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000249-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 30</span>
30:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">null_object?</span>
31:         <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:null_object</span>]
32:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000258" class="method-detail">
        <a name="M000258"></a>

        <div class="method-heading">
          <a href="#M000258" class="method-signature">
          <span class="method-name">raise_unexpected_message_args_error</span><span class="method-args">(expectation, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000258-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000258-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 106</span>
106:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_unexpected_message_args_error</span>(<span class="ruby-identifier">expectation</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
107:         <span class="ruby-ivar">@error_generator</span>.<span class="ruby-identifier">raise_unexpected_message_args_error</span> <span class="ruby-identifier">expectation</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
108:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000259" class="method-detail">
        <a name="M000259"></a>

        <div class="method-heading">
          <a href="#M000259" class="method-signature">
          <span class="method-name">raise_unexpected_message_error</span><span class="method-args">(sym, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000259-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000259-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 110</span>
110:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raise_unexpected_message_error</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
111:         <span class="ruby-ivar">@error_generator</span>.<span class="ruby-identifier">raise_unexpected_message_error</span> <span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
112:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000255" class="method-detail">
        <a name="M000255"></a>

        <div class="method-heading">
          <a href="#M000255" class="method-signature">
          <span class="method-name">received_message?</span><span class="method-args">(sym, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000255-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 78</span>
78:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">received_message?</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
79:         <span class="ruby-ivar">@messages_received</span>.<span class="ruby-identifier">any?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">array</span><span class="ruby-operator">|</span> <span class="ruby-identifier">array</span> <span class="ruby-operator">==</span> [<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>]}
80:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000254" class="method-detail">
        <a name="M000254"></a>

        <div class="method-heading">
          <a href="#M000254" class="method-signature">
          <span class="method-name">reset</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000254-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/mocks/proxy.rb, line 70</span>
70:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
71:         <span class="ruby-identifier">clear_expectations</span>
72:         <span class="ruby-identifier">clear_stubs</span>
73:         <span class="ruby-identifier">reset_proxied_methods</span>
74:         <span class="ruby-identifier">clear_proxied_methods</span>
75:         <span class="ruby-identifier">reset_nil_expectations_warning</span>
76:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>